{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="author" content="常伟">
  <title>知识问答</title>
  <link rel="stylesheet" href="{% static "libs/bootstrap/css/bootstrap.css" %}">
{#  <link rel="stylesheet" href="static/libs/bootstrap/css/bootstrap.css">#}
  <link rel="stylesheet" href="{% static "libs/font-awesome/css/font-awesome.css" %}">
{#  <link rel="stylesheet" href="static/libs/font-awesome/css/font-awesome.css">#}
  <link rel="stylesheet" href="{% static "libs/simditor/styles/simditor.css" %}">
{#  <link rel="stylesheet" href="static/libs/simditor/styles/simditor.css">#}
  <link rel="stylesheet" href="{% static "css/main.css" %}">
</head>

<body>
  <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container container-fluid">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="#">智游问答</a>
      </div>
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
          <li><a href="{% url 'questions:index' %}">最新问题 <span class="sr-only">(current)</span></a></li>
          <li><a href="{% url 'questions:index' %}">最难问题</a></li>
          <li  class="active"><a href="{% url 'questions:question' %}">我的提问</a></li>
          <li><a href="#">我的回答</a></li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li class="dropdown">
            <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ cook }} <span class="caret"></span></a>
            <ul class="dropdown-menu">
              <li><a href="#">个人信息</a></li>
              <li><a href="#">退出登录</a></li>
            </ul>
          </li>
        </ul>
      </div>
    </div>
  </nav>
  <div class="container">
    <div class="row">
      <div class="col-md-3 col-md-push-9">
        <div class="panel panel-default">
          <div class="panel-heading">
            <h3 class="panel-title">分类</h3>
          </div>
          <div class="panel-body keywords">
              {% for class in classify %}
              <span class="label label-default">{{ class.classify }}</span>
              {% endfor %}



            <span class="label label-warning"><span class="glyphicon glyphicon-plus-sign"></span>添加</span>
          </div>
        </div>
        <div class="panel panel-default">
          <div class="panel-heading">
            <h3 class="panel-title">关键词</h3>
          </div>
          <div class="panel-body keywords">
            <span class="label label-default">jQuery</span>
            <span class="label label-default">Require.js</span>
            <span class="label label-default">artTemplate</span>
            <span class="label label-default">MongoDB</span>
            <span class="label label-default">mongoose</span>
            <span class="label label-default">angular</span>
            <span class="label label-default">ionic</span>
            <span class="label label-default">Cordova</span>
            <span class="label label-default">PhoneGap</span>
            <span class="label label-success">Bootstrap</span>
            <span class="label label-default">jQuery</span>
            <span class="label label-default">Require.js</span>
            <span class="label label-default">artTemplate</span>
            <span class="label label-default">MongoDB</span>
            <span class="label label-default">mongoose</span>
            <span class="label label-default">angular</span>
            <span class="label label-default">ionic</span>
            <span class="label label-default">Cordova</span>
            <span class="label label-default">PhoneGap</span>
            <span class="label label-default">Bootstrap</span>
            <span class="label label-warning">
              <span class="glyphicon glyphicon-plus-sign"></span>
              添加
            </span>
          </div>
        </div>
      </div>
      <div class="col-md-9 col-md-pull-3">
        <div class="panel panel-default">
          <div class="panel-body">
            <!-- <h1></h1> -->
            <div class="row">
              <div class="col-xs-7">
                <h2>提问问题</h2>
              </div>
            </div>
            <br>
            <form class="form-horizontal" role="form" action="{% url 'questions:question' %}" method="post">
              <div class="form-group">
                <label for="tags" class="col-sm-2 control-label">问题分类：</label>
                <div class="col-sm-4">
                  <select class="form-control" name="tags" id="tags">
                      {% for class in classify %}
                    <option>{{ class.classify }}</option>
                      {% endfor %}
                  </select>
                </div>
              </div>
              <div class="form-group">
                <label for="title" class="col-sm-2 control-label">问题：</label>
                <div class="col-sm-6">
                  <!--标题长度请不要超过30个字-->
                  <input type="text" class="form-control" name="title" id="title" placeholder="请输入您要提问的问题">
                </div>
              </div>
<!--               <div class="form-group">
                <label for="cover" class="col-sm-2 control-label">上传封面：</label>
                <div class="col-sm-2" id="cover">
                  <button class="btn btn-default btn-block" type="button">上传图片</button>
                  <input type="file" name="cover" class="hidden">
                </div>
              </div> -->
              <div class="form-group">
                <label for="post" class="col-sm-2 control-label">问题描述：</label>
                <div class="col-sm-10">
                  <textarea class="form-control" name="post" rows="6" id="post"></textarea>
                </div>
              </div>
              <div class="form-group">
                <div class="col-sm-offset-2 col-sm-4">
                  <button type="submit" class="btn btn-success btn-block">提问问题</button>
                </div>
              </div>
            {% csrf_token %}
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="text-center page-footer">
    <p class="visible-xs-block visible-sm-block visible-md-inline visible-lg-inline">智游教育问答 &nbsp;&nbsp; &copy;zhiyou100.com</p>
    <p class="visible-md-inline visible-lg-inline">&nbsp;&nbsp;</p>
    <p class="visible-md-inline visible-lg-inline">河南智游臻龙教育科技有限公司</p>
  </div>
  <script src="{% static "libs/jquery/jquery.js" %}"></script>
  <script src="{% static "libs/bootstrap/js/bootstrap.js" %}"></script>
  <script src="{% static "libs/simditor/scripts/module.min.js" %}"></script>
  <script src="{% static "libs/simditor/scripts/hotkeys.min.js" %}"></script>
  <script src="{% static "libs/simditor/scripts/simditor.min.js" %}"></script>
  <script>
  $(function() {
    // 上传文件按钮触发
    // $('#cover').find('button').click(function() {
    //   $('#cover').find('input[type=file]').click();
    // });

    // 创建编辑器
    new Simditor({
      // 必选项，选定元素
      textarea: $('#post'),
      // 设定工具栏功能
      toolbar: ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color',
        '|', 'ol', 'ul', 'blockquote', 'code', 'table',
        '|', 'link', 'image', 'hr',
        '|', 'indent', 'outdent', 'alignment'
      ]
    })
  })
  </script>
</body>

</html>
